<?php
/*
 * [JINYUN!] (C)2001-2099 Jinyunweb.com
 * This is NOT a freeware, use is subject to license terms
 * $Id: 2017-12-13 03:39:35 apple $
*/
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'get';
$return=array();
if($_RQ['op']=='get'){
	$setting=uni_setting('member_setting');
	$register=uni_setting('register');
	$setting['member']=$setting['member']?$setting['member']:array('tixians'=>0);
	$setting['mb']=$setting['mb']?$setting['mb']:array('clevel'=>'');
	$setting['sign']=$setting['sign']?$setting['sign']:array('open'=>0);
	$setting['sms_mb']=$setting['sms_mb']?:array('login'=>$register['dxmb']);
	$return['item']=$setting;
	$return['show']='member';
	$return['htmls']=array(
		'type'=>'edit',
		'post'=>'post',
		'edit_tab'=>true,
		'desc'=>'参数设置',
    	'edits'=>array(
			array(
    			'title'=>'签到设置',
    			'list'=>array(
    			array('type'=>'switch','title'=>'是否开启签到','tovalue'=>'pagedata.item.sign','name'=>'open'),
    			array('type'=>'string','title'=>'签到奖励积分','tovalue'=>'pagedata.item.sign','name'=>'credit'),
    			array('type'=>'text','title'=>'签到规则','tovalue'=>'pagedata.item.sign','name'=>'content')
    			)
			),
			array(
    			'title'=>'短信模版ID设置',
    			'list'=>array(
					array('type'=>'string','title'=>'登陆验证短信','tovalue'=>'pagedata.item.sms_mb','name'=>'login','help'=>'填写模板id'),
    			)
			),
			array(
    			'title'=>'会员中心UI设置',
    			'list'=>array(
					array('type'=>'tip','title'=>'同一用站点设置里面的主题配色','name'=>'top_bgcolor','help'=>'自定义系统颜色系，默认： red'),
    			)
			),
			array(
    			'title'=>'会员卡设置',
    			'list'=>array(
					array('type'=>'image','title'=>'会员背景图片','name'=>'cardbg','help'=>'会员卡背景图片：尺寸：宽536，高318'),
    			)
			)
		)
	);
	exi($return);
}
if($_RQ['op']=='post'){
	$postdata=get_postdata();
	$register=uni_setting('register');
	$register['dxmb']=$postdata['sms_mb']['login'];
	uni_setting('register',$register);
	uni_setting('member_setting',$postdata);
	exi('设置成功！');
}
?>